html, body {
    overflow: hidden;
    -webkit-user-select: none;
    color: @textColor;
}
.wrapper {
    position: relative;
    top: 0;
    height: 100vh;
}
.main.wrapper {
    background-color: @pageBackground;
}
.zoom.normal {
    font-size: 1rem;
}
.zoom.large {
    font-size: 1.15rem;
}
.zoom.small {
    font-size: 0.85rem;
}
.zoom.compact td {
    padding: .25em .7em;
}
.wrapper .sidebar, .main-panel {
    overflow: auto;
    max-height: 100%;
    height: 100%;
}
.wrapper .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px;
    display: block;
    z-index: 1;
    overflow-x: hidden;
    border-right: 1px solid @borderColor;
}
.sidebar + div {
    position: relative;
    z-index: 2;
    float: right;
    width: calc(~"100% - 260px");
    min-height: 100%;
    overflow: hidden;
}
.torrent.sidebar {
    background-color: @pageForeground;
}
.sidebar .nav {
    margin: 0px;
    padding: 14px;
}
.sidebar .nav li {
    font-size: 15px;
    padding: 15px;
    margin: 10px;
    border-radius: 5px;
    list-style-type: none;
    cursor: pointer;
}
.sidebar .nav li.active {
    background: @highlightBackground !important;
}
.sidebar .nav li:hover {
    background: @highlightBackground !important;
}
.sidebar .nav + .divider {
    margin-top: 0;
}
.sidebar .section {
    padding: 12px;
    padding-left: 24px;
    padding-right: 24px;
    border-top: 1px solid @borderColor;
    border-bottom: 1px solid @borderColor;
    font-weight: 700;
    font-style: normal;

}
.sidebar .filter.label {
    margin: 0px;
    padding: 25px;
    padding-top: 12px;
    padding-right: 50px;
}
.sidebar .filter.label li {
    margin: 5px;
    list-style-type: none;
    cursor: pointer;
}
.torrent.tag {
    background-color: @highlightBackground;
}
.torrent.tag .detail {
    float: right;
}
.clear.button {
    float: right;
    border-radius: 100px !important;
    margin: -4px;
}
.float-left {
    float: left;
}
.main-panel {
    /*background: rgba(247, 247, 248, 1);*/
}
.main-panel .action.header {
    white-space: nowrap;
    height: 50px;
    padding: 0 7px;
    background-color: @pageForeground;
    line-height: 50px;
    border-bottom: 1px solid @borderColor;
    overflow: visible !important;
}
.action.header > div {
  display: inline-block;
}
.action.header .actions.left {
  float: left;
}
.action.header .actions.right {
  overflow: hidden;
  width: auto;
  display: block;
}
.action.header .actions.right .input {
  width: 100%;
  float: right;
  max-width: 250px;
  min-width: 50px;
  margin: 6px 0;
}
.container > .content {
    position: absolute;
    right: 0;
    left: 0;
    min-width: 300px;
    height: calc(~"100% - 65px");
    padding: 21px;
    overflow-y: auto;
    overflow-x: hidden;
}
.container > .actions {}
.container > .actions.footer {
    white-space: nowrap;
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 65px;
    padding: 1rem;
    border-top: 1px solid @borderColor;
    text-align: right;
    background-color: @pageMiddleground;
    overflow: hidden;
}

.main-panel {
    .main-content {
        height: calc(~"100% - 50px - 27px");
        overflow-x: hidden;
        /*overflow-y: auto;*/
        overflow-y: overlay; /* Chrome scrollbar on top */
    }

    .status-bar {
        display: flex;
        justify-content: flex-end;
        border-top: 1px solid @borderColor;
        padding-top: 0.25rem;
        padding-left: 1rem;
        padding-bottom: 0.25rem;
        padding-right: 1rem;

        & > * {
            margin-left: 1rem;
            margin-right: 1rem;
        }
    }
}
.ui.welcome.form.loading:before {
    background: fadeout(@pageBackground, 25%);
}
.torrent.table {
    border-radius: 0;
    margin: 0;
    border: none;
}

.value {
    padding: 0 .7em;
}

.sorting.icon {
    position: absolute;
    right: 5px;
}

.ui.table thead th {
    cursor: default !important;
}

.ui.torrent.table {
    tfoot {
        position: absolute;
        bottom: 0;
    }

    &.is-sticky th {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    tr td {
        &:first-child {
            padding-left: 0.75em;
        }
        padding: 0.45em 0.30em;
    }
    tr th {
        &:first-child {
            padding-left: 0.75em;
        }
        padding: 0.75em 0.30em;
    }
}
.ui.torrent.table.compact {
    tr td {
        &:first-child {
            padding-left: 0.75em;
        }
        padding: 0.25em 0.30em;
    }
    tr th {
        &:first-child {
            padding-left: 0.75em;
        }
        padding: 0.5em 0.30em;
    }
}
.torrent.table thead th.sortup,
.torrent.table thead th.sortdown {
    padding-right: 25px !important;
}

.torrent.table thead th.sortdown i::before {
    content: "\f078"; /* Arrow down icon */
}

.torrent.table thead th.sortup i::before {
    content: "\f077"; /* Arrow up icon */
}

.torrent.table tbody tr {
    cursor: default;
    -webkit-user-select: none !important;
}
.ui.torrent.progress {
    margin: 0 !important;
    overflow: hidden;
    font-size: inherit;
    -webkit-transform: translate3d(0, 0, 0); /* macOS fix */
}
.torrent.progress label {
    position: absolute;
    width: 100%;
    height: 100%;
    line-height: 1.75em;
    text-align: center;
    z-index: 1;
    color: rgba(255, 255, 255, .9);
    font-weight: 700;
}
.torrent.progress .bar {
    min-width: 0;
    width: 100%;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;

    &.idle {
        transition: none;
    }
}
.torrent.sort.label {
    float: right;
    border-radius: 25px;
}
.torrent.context.menu {
    display: none;
    position: absolute;
}
.torrent.context.menu .ui.vertical.menu {
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.15);
}
.overlay {
    position: absolute;
    background-color: @overlayBackground;
    height: 100%;
    width: 100%;
}

.server.list {
    max-height: 65vh;
    overflow-y: scroll;
}

.meta.text {
    color: #888888;
    font-style: italic;
}
.ui.inverted.solid.dimmer {
    background-color: @pageBackground;
}
.transparent.overlay {
    background-color: rgba(0, 0, 0, 0.75);
}
.narrow.column {
    max-width: 450px;
}
.ui.stretched.segment {
    overflow: hidden;
    position: absolute;
    display: block;
    height: auto;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    margin: 10vmin;
    padding: 0px;
}
.menu .item .checkbox {
    float: right;
    margin: 0 0 0 .5em;
    width: 1.18em;
}

::-webkit-scrollbar {
    background: none;
    -webkit-appearance: none;
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0,0,0,.5);
    -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}
::-webkit-scrollbar * {
    background:transparent;
}

/*#########################################*/
/* Overlay Animation */
/*#########################################*/

.overlay.ng-hide-add, .overlay.ng-hide-remove {
    /* this is required as of 1.3x to properly
    apply all styling in a show/hide animation */
    -webkit-transition: 0.10s cubic-bezier(.24, .78, .35, .99) all;
}
.overlay.ng-hide-add-active, .overlay.ng-hide-remove-active {
    /* the transition is defined in the active class */
    -webkit-transition: 0.10s cubic-bezier(.24, .78, .35, .99) all;
}
.overlay.ng-hide-add {
    opacity: 1;
    transform: scale(1.0);
}
.overlay.ng-hide-add.ng-hide-add-active {
    opacity: 0;
    transform: scale(1.1);
}
.overlay.ng-hide-remove {
    opacity: 0;
    transform: scale(1.1);
}
.overlay.ng-hide-remove.ng-hide-remove-active {
    opacity: 1;
    transform: scale(1.0);
}

/*#########################################*/
/* Forms */
/*#########################################*/

.ui .form .fields .field {
  margin: 0 0 1em !important;
}

.ui .fields {
  margin: 0 -.5em 0 !important;
}

.ui .form .field .checkbox {
  margin-top: 1em;
}

/*#########################################*/
/* Notifications */
/*#########################################*/

.notifications.container {
    top: 15px;
    right: 15px;
    width: 375px;
    position: absolute;
}
.notification {
    margin: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
.ui.negative.message {
    background-color: #F2B3B3;
    color: #7A1200;
    border: none;
}
.ui.positive.message {
    background-color: rgb(199, 236, 179);
    color: #1F5130;
    border: none;
}
.notification.ng-enter {
    -webkit-animation: notification-show 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.27499);
}
.notification.ng-leave {
    -webkit-animation: notification-hide .10s cubic-bezier(.34, .07, 1, .2), notification-shrink .24s .12s cubic-bezier(0.5, 0, 0, 1);
    -webkit-animation-fill-mode: forwards;
}
@-webkit-keyframes notification-show {
    0% {
        opacity: 0;
        transform: perspective(350px) translate(0, -30px) rotateX(90deg);
    }
    100% {
        opacity: 1;
        transform: perspective(350px) translate(0, 0) rotateX( 0deg);
    }
}
@-webkit-keyframes notification-hide {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(.5);
    }
}
@-webkit-keyframes notification-shrink {
    0% {
        opacity: 0;
        max-height: 70px;
    }
    100% {
        opacity: 0;
        max-height: 0;
    }
}

/*#########################################*/
/* Dropdown Menus */
/*#########################################*/

.dropdown .menu.visible-add-active {
    -webkit-animation: dropdown-show 0.16s cubic-bezier(0.175, 0.885, 0.32, 1.27499);
    -webkit-transform-origin: center top;
}

.dropbox .menu.hidden-add-active {
    -webkit-animation: dropdown-show 0.16s cubic-bezier(.34, .07, 1, .2);
}

@-webkit-keyframes dropdown-show {
    0% {
        opacity: 0;
        transform: perspective(650px) translate(0, -30px);
    }
    100% {
        opacity: 1;
        transform: perspective(650px) translate(0, 0);
    }
}

@-webkit-keyframes dropdown-hide {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(.5);
    }
}

.popup {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    -webkit-transform-origin: center center;
    background-color: rgba(255, 255, 255, 0.5);
}

.popup .content h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -125px !important;
    margin-top: -25px !important;
    -webkit-animation: dragdrop 1s ease-in-out infinite;
}

.popup.ng-enter {
    -webkit-animation: dragdrop-in 0.12s ease-out;
}

.popup.ng-leave {
    -webkit-animation: dragdrop-out 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.27499);
}

@-webkit-keyframes dragdrop {
    0% {
        transform: rotateZ(6deg);
    }
    50% {
        transform: rotateZ(-6deg);
    }
    100% {
        transform: rotateZ(6deg);
    }
}

@-webkit-keyframes dragdrop-in {
    0% {
        opacity: 0;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@-webkit-keyframes dragdrop-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}
